{% load static %}
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>文宣</title>
    <link href="../static/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link href="../static/css/cl-css.css" rel="stylesheet">
    <link href="../static/font-awesome/css/font-awesome.min.css" rel="stylesheet">
    <link rel="stylesheet" href="../static/highlight/styles/railscasts.css">
</head>
<body>
<div class="cl-header container-fluid">
    <div class="header-content container">
        <nav class="navbar navbar-expand-lg navbar-light">
            <a class="navbar-brand" href="../static/calmlog-index.html">
                <img src="../static/img/u=219697943,2447582146&fm=26&fmt=auto.png" width="144" height="72" alt="">
            </a>
            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
                <span class="navbar-toggler-icon"></span>
            </button>
            <div class="collapse navbar-collapse justify-content-end" id="navbarNav">
                <ul class="navbar-nav">
                    <li class="nav-item active">
                        <a class="nav-link" href="{% url 'home:index' %}">首页 <span class="sr-only">(current)</span></a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">教程</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">模板</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">日记</a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link" href="#">关于</a>
                    </li>
                </ul>
            </div>
        </nav>
    </div>
</div>


<div class="cl-cantainer container">

    <div class="cl-cantainer container">
      <div class="row">
        <div class="col-md-9 cl-left">
            <div class="cl-artical-content">
                <h2 class="cl-artical-title">{{ article.title }}</h2>
                <div class="cl-card-tag">
                    <div><span>作者：{{ article.author }}</span></div>
                    <div><span>{{ article.total_views }}</span>人浏览 / <span>{{ article.comments_count }}</span>人评论</div>
                </div>
                <div class="cl-artical">
                    {{ article.content | safe }}
                </div>
            </div>
        </div>
      </div>
    </div>

            <div class="recommend-panel">
                <h4 class="right-card-title">相关文章</h4>
                <div class="card-deck">
                    <div class="card ll-panel">
                        <a class="recommend-panel-link" href="../static/calmlog-details.html">
                            <div class="recommend-panel-top">
                                <img src="../static/temporary-img/list-image1.jpg" class="img-fluid" alt="">
                            </div>
                            <div class="recommend-panel-bottom">
                                如何有效避免设计作品“空”？
                            </div>
                        </a>
                    </div>
                    <div class="card ll-panel">
                        <a class="recommend-panel-link" href="../static/calmlog-details.html">
                            <div class="recommend-panel-top">
                                <img src="../static/temporary-img/list-image2.jpg" class="img-fluid" alt="">
                            </div>
                            <div class="recommend-panel-bottom">
                                高点击率钻展，设计环节…
                            </div>
                        </a>
                    </div>
                    <div class="card ll-panel">
                        <a class="recommend-panel-link" href="../static/calmlog-details.html">
                            <div class="recommend-panel-top">
                                <img src="../static/temporary-img/list-image3.jpg" class="img-fluid" alt="">
                            </div>
                            <div class="recommend-panel-bottom">
                                无敌配色技巧（一）
                            </div>
                        </a>
                    </div>
                </div>
            </div>
            <div class="comment">


                <form class="cl-comment-from" method="post">
                    {% csrf_token %}
                    <input type="hidden" name="art_id" value="{{ article.id }}">
                    <div><textarea placeholder="说点什么吧..." rows="5" name="content"></textarea></div>
                    <button type="submit">留言</button>
                    <span class="clearfix"></span>
                </form>

                <h4 class="right-card-title">全部评论</h4>

                {% for comm in comms %}

                    <div class="comment-panel">
                        <div class="comment-panel-portrait">
                            <img src="{{ comm.user.avatar.url }}" class="img-fluid rounded-circle" alt="">
                        </div>
                        <div class="comment-panel-content">
                            <div class="comment-panel-content-item">
                                <div class="comment-author">{{ comm.user.username }}</div>
                                <div>{{ comm.created_time }}</div>
                            </div>
                            <div class="comment-panel-content-main">{{ comm.content }}</div>
                        </div>
                        <span class="clearfix"></span>
                        <div class="text-primary"><a href="">回复</a></div>
                    </div>
                {% endfor %}
        </div>


            <div class="right-card">

                <div class="right-card-title">最新文章</div>
                    <ul class="right-recommended-list">
                        {% for new_art in new_arts %}
                            <li>
                                <a href="{% url 'home:detail' %}?art_id={{ new_art.id }}"><i class="fa fa-angle-right" aria-hidden="true"></i>{{ new_art.title }}</a>
                            </li>
                        {% endfor %}
                    </ul>
                </div>
            </div>


         <div class="right-card-main">
                    <div class="right-card-title">热门标签</div>
                    <ul class="label">
                        {% for hot_tag in hot_tags %}
                            <li><a href="#">{{ hot_tag.tags }}</a></li>
                        {% endfor %}
                    </ul>
                </div>
    </div>
</div>


<div class="container-fluid cl-footer">
    <div class="container">
        <p class="cl-copyright">本设计由简.工作室荣誉出品</p>
        <p class="cl-copyright">copyright @ 2017~2018 简.工作室（www.jeanstudio.cn）</p>
    </div>
</div>
<script src="../static/jquery/jquery.min.js"></script>
<script src="../static/bootstrap/js/bootstrap.min.js"></script>
<script src="../static/highlight/highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>

</body>
</html>